import canvasAbstract from "./canvasAbstract";
import model from "../model/boss";
import config from "../config";
export default new class extends canvasAbstract implements ICanvas {
  life: number = 10;
  name: string = "boss";
  num(): number {
    return 0;
  }
  model(): IModelConstructor {
    return model;
  }
  render(): void {
    this.createModels();
    super.renderModels();
  }
  protected createModels(): void {
    [
      {
        x: config.canvas.width / 2,
        y: config.canvas.height - config.model.height
      }
    ].forEach(position => {
      const model = this.model() as IModelConstructor;
      const instance = new model(position.x, position.y);
      this.models.push(instance);
    });
  }
}("boss");
